package duotai;

public class Master {
    public void SetEat(){
        Pet pet=new Dog();
        pet.setType(1);
        pet.eat (pet);
        Pet pet1=new Penguin();
        pet1.setType(2);
        pet.eat (pet1);
    }
}
